﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Grid : MonoBehaviour
{
    [Header("Param")]
    public int x = 0;
    public int y = 0;
    public float cellSize;

    [Header("Component")]
    public SpriteRenderer bg;

    void Start()
    {
        
    }

    public void Init(int _x, int _y)
    {
        x = _x;
        y = _y;
        cellSize = ShuaiManager.Instance.cellSize;

        this.gameObject.name = "Grid_" + (x + 1) + "_" + (y + 1);
        this.transform.localScale = new Vector3(cellSize, cellSize, 1);
        this.transform.position = CellFunctions.GetPos(x, y);
    }
}
